﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using LeadVinaglue.Models;
using LeadVinaglue.Models.ViewPages;
using LeadVinaglue.Repository;
using LeadVinaglue.Utility;

namespace LeadVinaglue.Controllers
{
    public class HomeController : BaseController
    {
        // Create an instance for repository
        HomeManagementRepository repository = new HomeManagementRepository();

        // Action Result
        [DeviceFilterAttribute(Order = 1)]
        [CompressFilter(Order = 2)]
        public ActionResult Index()
        {
            HomeViewModel model = new HomeViewModel();

            // Setup common
            model.PageName = LeadConstant.HOME;
            SetupCommon(model);

            // Get home model
            repository.GetModel(ref model);

            return View(model);
        }
        public ActionResult About()
        {
            HomeViewModel model = new HomeViewModel();

            // Setup common
            model.PageName = LeadConstant.HOME;
            SetupCommon(model);

            return View(model);
        }
    }
}
